Skip to content

CMP-3883: Create an e2e suite for operator deployment tests - #1110

Merged
yuumasato merged 5 commits into
ComplianceAsCode:masterfrom
taimurhafeez:CMP-3883
Jun 11, 2026
Merged

CMP-3883: Create an e2e suite for operator deployment tests#1110
yuumasato merged 5 commits into
ComplianceAsCode:masterfrom
taimurhafeez:CMP-3883

Conversation

@taimurhafeez

@taimurhafeez taimurhafeez commented Mar 13, 2026

Copy link
Copy Markdown
Collaborator

Created a dedicated test suite for operator deployment functionality tests.

New Suite: tests/e2e/deployment/

3 deployment tests copied from parallel and serial suites
Tests focus on: metrics endpoints, HTTP versions, operator upgrade behavior
Run with: make e2e-deployment
Tests included:

TestServiceMonitoringMetricsTarget (Prometheus metrics monitoring)
TestResultServerHTTPVersion (HTTP version verification)
TestProfileBundleDefaultIsKept (operator upgrade/restart behavior)

Tested on OCP 4.22.
--- PASS: TestServiceMonitoringMetricsTarget (74.15s)
--- PASS: TestProfileBundleDefaultIsKept (58.37s)
--- PASS: TestResultServerHTTPVersion (14.76s)
Assisted by Claude.

@openshift-ci-robot

Copy link
Copy Markdown
Collaborator

@taimurhafeez: This pull request references CMP-3883 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Created a dedicated test suite for operator deployment functionality tests.

New Suite: tests/e2e/deployment/

3 deployment tests copied from parallel and serial suites
Tests focus on: metrics endpoints, HTTP versions, operator upgrade behavior
Run with: make e2e-deployment
Tests included:

TestServiceMonitoringMetricsTarget (Prometheus metrics monitoring)
TestResultServerHTTPVersion (HTTP version verification)
TestProfileBundleDefaultIsKept (operator upgrade/restart behavior)

Tested on OCP 4.21.
Assisted by Claude.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci
openshift-ci Bot requested review from jhrozek and rhmdnd March 13, 2026 13:31
@github-actions

Copy link
Copy Markdown

🤖 To deploy this PR, run the following command:

make catalog-deploy CATALOG_IMG=ghcr.io/complianceascode/compliance-operator-catalog:1110-77596e53d06fbff222dbb2c89ac4bbeb3c5f8f2c

@rhmdnd

rhmdnd commented Apr 22, 2026

Copy link
Copy Markdown
Collaborator

/retest-required

Looks like CI setup failed

@openshift-ci-robot

Copy link
Copy Markdown
Collaborator

@taimurhafeez: This pull request references CMP-3883 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Created a dedicated test suite for operator deployment functionality tests.

New Suite: tests/e2e/deployment/

3 deployment tests copied from parallel and serial suites
Tests focus on: metrics endpoints, HTTP versions, operator upgrade behavior
Run with: make e2e-deployment
Tests included:

TestServiceMonitoringMetricsTarget (Prometheus metrics monitoring)
TestResultServerHTTPVersion (HTTP version verification)
TestProfileBundleDefaultIsKept (operator upgrade/restart behavior)

Tested on OCP 4.22.
--- PASS: TestServiceMonitoringMetricsTarget (74.15s)
--- PASS: TestProfileBundleDefaultIsKept (58.37s)
--- PASS: TestResultServerHTTPVersion (14.76s)
Assisted by Claude.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@taimurhafeez

Copy link
Copy Markdown
Collaborator Author

/retest-required

@vickeybrown

Copy link
Copy Markdown
Collaborator

This might be a silly question, but how do these tests do something different than the ones they were copied from? I'm struggling to figure out how it knows to only test deployment related things rather than what they were testing in their original files. Also, I noticed that the ticket itself mentions isolating tests into their own suite, does that mean that the tests these were copied from should be removed?

rhmdnd
rhmdnd previously approved these changes May 29, 2026

@rhmdnd rhmdnd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only minor comments that could be addressed in a follow on. Once we add a new suite in openshift/release for these and start running them in CI, I think we can clean up the old ones. That way we ensure coverage through the migration.

Thanks!

Comment thread tests/e2e/deployment/main_test.go Outdated
timeouterr := wait.Poll(framework.RetryInterval, framework.Timeout, func() (bool, error) {
pb := &compv1alpha1.ProfileBundle{}
if lastErr := f.Client.Get(bctx, pbkey, pb); lastErr != nil {
log.Printf("error getting ocp4 PB. Retrying: %s\n", err)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should use lastErr here?

Comment thread Makefile Outdated
E2E_GO_TEST_FLAGS?=-v -test.timeout 120m

# By default we run all tests; available options: all, parallel, serial
# By default we run all tests; available options: all, parallel, config, deployment, serial

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the config suite a separate PR?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha - i see it is.

#1108

Could pull this out to that PR purely for isolation purposes.

Comment thread Makefile Outdated

.PHONY: e2e-deployment
e2e-deployment: e2e-set-image prep-e2e ## Run operator deployment end-to-end tests concurrently.
@CONTENT_IMAGE=$(E2E_CONTENT_IMAGE_PATH) BROKEN_CONTENT_IMAGE=$(E2E_BROKEN_CONTENT_IMAGE_PATH) $(GO) test ./tests/e2e/deployment $(E2E_GO_TEST_FLAGS) -args $(E2E_ARGS) | tee tests/e2e-test.log

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was my fault initially in that i reused the same log file for all logs, but it might make sense to break these into their own log files now that we're going to have more suites (e.g., tests/e2e-deployment-tests.log)

@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown

🤖 To deploy this PR, run the following command:

make catalog-deploy CATALOG_IMG=ghcr.io/complianceascode/compliance-operator-catalog:1110-8af3bcd98dff27803f2e673759fbe0b7589d168b

@taimurhafeez

Copy link
Copy Markdown
Collaborator Author

This might be a silly question, but how do these tests do something different than the ones they were copied from? I'm struggling to figure out how it knows to only test deployment related things rather than what they were testing in their original files. Also, I noticed that the ticket itself mentions isolating tests into their own suite, does that mean that the tests these were copied from should be removed?

My understanding is that there is no change regarding what will be tested with these tests. It is merely an reorganization. The reason for creating suites is to have ability to run these in parallel. Why now is the better time to do that is, cause we are moving downstream test cases upstream. If all suites are created before other downstream ported PR land, all those tests will have a suitable place to reside. Yes, as Lance has suggested, the plan is to remove these from original ones once CI with new suites is functioning as expected. Hope I comprehended and answered correctly.

@taimurhafeez
taimurhafeez requested a review from rhmdnd June 2, 2026 10:30
vickeybrown
vickeybrown previously approved these changes Jun 2, 2026
@openshift-ci openshift-ci Bot removed the lgtm label Jun 4, 2026
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

🤖 To deploy this PR, run the following command:

make catalog-deploy CATALOG_IMG=ghcr.io/complianceascode/compliance-operator-catalog:1110-56ecbbc7fb03f9c89ca3aa196eb6562136cf0ac0

rhmdnd
rhmdnd previously approved these changes Jun 4, 2026

@rhmdnd rhmdnd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Comment thread Makefile
e2e-parallel: e2e-set-image prep-e2e ## Run non-destructive end-to-end tests concurrently.
@CONTENT_IMAGE=$(E2E_CONTENT_IMAGE_PATH) BROKEN_CONTENT_IMAGE=$(E2E_BROKEN_CONTENT_IMAGE_PATH) $(GO) test ./tests/e2e/parallel $(E2E_GO_TEST_FLAGS) -args $(E2E_ARGS) | tee tests/e2e-test.log

.PHONY: e2e-deployment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread tests/e2e/deployment/main_test.go Outdated
@openshift-ci openshift-ci Bot added the lgtm label Jun 4, 2026
@rhmdnd

rhmdnd commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

Looks great and the e2e-aws-deployment e2e tests are running from openshift/release#76333

@taimurhafeez
taimurhafeez dismissed stale reviews from rhmdnd and vickeybrown via de6c667 June 4, 2026 16:58
@openshift-ci openshift-ci Bot removed the lgtm label Jun 4, 2026
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

🤖 To deploy this PR, run the following command:

make catalog-deploy CATALOG_IMG=ghcr.io/complianceascode/compliance-operator-catalog:1110-de6c6670f53f5f81cc154c2a7313a04b9b6373ba

@rhmdnd rhmdnd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci Bot added the lgtm label Jun 4, 2026
@yuumasato

Copy link
Copy Markdown
Member

/retest

1 similar comment
@taimurhafeez

Copy link
Copy Markdown
Collaborator Author

/retest

@openshift-ci

openshift-ci Bot commented Jun 10, 2026

Copy link
Copy Markdown

@taimurhafeez: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-rosa de6c667 link true /test e2e-rosa
ci/prow/e2e-aws-config de6c667 link true /test e2e-aws-config
ci/prow/e2e-aws-deployment de6c667 link true /test e2e-aws-deployment

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@yuumasato

Copy link
Copy Markdown
Member

/test e2e-aws-parallel

@yuumasato yuumasato left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci

openshift-ci Bot commented Jun 11, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhmdnd, taimurhafeez, yuumasato

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [rhmdnd,taimurhafeez,yuumasato]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@yuumasato yuumasato added this to the 1.10.0 milestone Jun 11, 2026
@yuumasato
yuumasato merged commit fa56c1f into ComplianceAsCode:master Jun 11, 2026
20 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants